package bigoo.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

    private static SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH:mm");

    public static Date parseDate(String date) {
	try {
	    return sdf.parse(date);
	} catch (ParseException e) {
	    e.printStackTrace();
	}
	return null;
    }

    @SuppressWarnings("deprecation")
    public static boolean equals(Date date1, Date date2) {
	return date1.getDay() == date2.getDay() && date1.getMonth() == date2.getMonth() && date1.getYear() == date2.getYear();
    }

}
